home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / clipspl.zip / CLIPSPL.C < prev    next >
C/C++ Source or Header  |  1993-01-04  |  1KB  |  80 lines

  1. /*
  2.  
  3.  
  4.         CLIPSPL.C        A set of CLIPPER callable functions
  5.                       to deal with the DOS print spooler
  6.                       from the DOS function call level.
  7.                      
  8.                      
  9.         RSS 06/20/89
  10.         
  11. */
  12.  
  13. #include        <stdio.h>
  14. #include        <string.h>
  15. #include        <stdlib.h>
  16. #include        <dos.h>
  17. #include        <errno.h>
  18. #include        "nandef.h"
  19. #include        "extend.h"
  20.  
  21. CLIPPER SplInst()
  22.  
  23.     {
  24.     union REGS    regs;
  25.     
  26.     regs.h.al = 0;
  27.     regs.h.ah = 1;
  28.     
  29.     int86( 47, ®s, ®s );
  30.     errno = 0;
  31.     
  32.     _retl( ( regs.h.al == 0xff ) ? 1 : 0 );
  33.     }
  34.  
  35. CLIPPER SplSubmit()
  36.     
  37.     {    
  38.     char            packet [ 6 ];
  39.     char far        *fp;
  40.     unsigned int    *a;
  41.     union REGS    regs;
  42.     struct SREGS    sregs;
  43.     char            *filename;
  44.     
  45.     filename = _parc( 1 );
  46.     
  47.     fp = (char far *) filename;
  48.     packet [ 0 ] = (char) 0;
  49.     a = (int *) &packet[ 1 ];
  50.     *a = FP_OFF( fp );
  51.     a = (int *) &packet[ 3 ];
  52.     *a = FP_SEG( fp );
  53.     
  54.     regs.h.al = 1;
  55.     regs.h.ah = 1;
  56.  
  57.     fp = (char far *) packet;
  58.     regs.x.dx = FP_OFF( fp );
  59.     sregs.ds = FP_SEG( fp );
  60.  
  61.     int86x( 47, ®s, ®s, &sregs );
  62.     errno = 0;
  63.     
  64.     _retni( regs.x.ax );
  65.     }
  66.  
  67. CLIPPER SplClear()
  68.  
  69.     {
  70.     union REGS    regs;
  71.     
  72.     regs.h.al = 3;
  73.     regs.h.ah = 1;
  74.     
  75.     int86( 47, ®s, ®s );
  76.     errno = 0;
  77.     
  78.     _retni( regs.x.ax );
  79.     }
  80.